/*
 * 版权所有 (c) 2022-2099 TBIT。保留所有权利。
 */

package com.tbit.main.pojo.VO;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * @author <a href="mailto:li.yao@tbit.com.cn">yao</a>
 * @version 4.2.0
 * @since 2024/9/13 10:19
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class PutMachineRespVO {

    private String userCode;

    private String reason;

    public static List<PutMachineRespVO> of(Map<String, String> result) {
        return result.entrySet().stream()
                .map(entry -> new PutMachineRespVO(entry.getKey(), entry.getValue()))
                .collect(Collectors.toList());
    }

}
